package demo.common.exception;

import lombok.Data;
import org.joda.time.DateTime;

/**
 * 异常返回格式
 */
@Data
public class ExceptionResult {
    private Integer status;

    private String message;

    private String timestamp;

    public ExceptionResult(SnowException e) {
        this.status = e.getStatus();
        this.message = e.getMessage();
        this.timestamp = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
    }
}
